'use strict';

function grouping_count(collection) {
  let obj = {} ;
  for(let item of collection){
    if(!obj[item]){
      obj[item] = 1;
    }else{
      obj[item]  ++ ;
    }
  }
  return obj ;
}

module.exports = grouping_count;
// var collection = [1,1,1,1,2,3,1,3,4,2,3,1,3,4,2];
// console.log(grouping_count(collection));